package com.ruoyi.squadweb.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.squadweb.mapper.CdkUsageRecordsMapper;
import com.ruoyi.squadweb.domain.CdkUsageRecords;
import com.ruoyi.squadweb.service.ICdkUsageRecordsService;

/**
 * CDK使用记录Service业务层处理
 *
 * @author ruoyi
 * @date 2024-03-17
 */
@Service
@DataSource(value = DataSourceType.SLAVE)
public class CdkUsageRecordsServiceImpl implements ICdkUsageRecordsService
{
    @Autowired
    private CdkUsageRecordsMapper cdkUsageRecordsMapper;

    /**
     * 查询CDK使用记录
     *
     * @param sequenceNumber CDK使用记录主键
     * @return CDK使用记录
     */
    @Override
    public CdkUsageRecords selectCdkUsageRecordsBySequenceNumber(Long sequenceNumber)
    {
        return cdkUsageRecordsMapper.selectCdkUsageRecordsBySequenceNumber(sequenceNumber);
    }

    /**
     * 查询CDK使用记录列表
     *
     * @param cdkUsageRecords CDK使用记录
     * @return CDK使用记录
     */
    @Override
    public List<CdkUsageRecords> selectCdkUsageRecordsList(CdkUsageRecords cdkUsageRecords)
    {
        return cdkUsageRecordsMapper.selectCdkUsageRecordsList(cdkUsageRecords);
    }

    /**
     * 新增CDK使用记录
     *
     * @param cdkUsageRecords CDK使用记录
     * @return 结果
     */
    @Override
    public int insertCdkUsageRecords(CdkUsageRecords cdkUsageRecords)
    {
        return cdkUsageRecordsMapper.insertCdkUsageRecords(cdkUsageRecords);
    }

    /**
     * 修改CDK使用记录
     *
     * @param cdkUsageRecords CDK使用记录
     * @return 结果
     */
    @Override
    public int updateCdkUsageRecords(CdkUsageRecords cdkUsageRecords)
    {
        return cdkUsageRecordsMapper.updateCdkUsageRecords(cdkUsageRecords);
    }

    /**
     * 批量删除CDK使用记录
     *
     * @param sequenceNumbers 需要删除的CDK使用记录主键
     * @return 结果
     */
    @Override
    public int deleteCdkUsageRecordsBySequenceNumbers(Long[] sequenceNumbers)
    {
        return cdkUsageRecordsMapper.deleteCdkUsageRecordsBySequenceNumbers(sequenceNumbers);
    }

    /**
     * 删除CDK使用记录信息
     *
     * @param sequenceNumber CDK使用记录主键
     * @return 结果
     */
    @Override
    public int deleteCdkUsageRecordsBySequenceNumber(Long sequenceNumber)
    {
        return cdkUsageRecordsMapper.deleteCdkUsageRecordsBySequenceNumber(sequenceNumber);
    }
}
